package listen

import (
	"context"
	"navi-mumbai/app/mq/usercenter/internal/config"
	kqMq "navi-mumbai/app/mq/usercenter/internal/mqs/kq"
	"navi-mumbai/app/mq/usercenter/internal/svc"

	"github.com/zeromicro/go-queue/kq"
	"github.com/zeromicro/go-zero/core/service"
)

// pub sub use kq (kafka)
func KqMqs(c config.Config, ctx context.Context, svcContext *svc.ServiceContext) []service.Service {

	return []service.Service{
		//Listening for changes in consumption flow status
		// 新增用户通知消息
		kq.MustNewQueue(c.KqAddUserNotifyMsgConf, kqMq.NewAddUserNotifyMsgActionMq(ctx, svcContext)),
		// 新增用户奖励
		kq.MustNewQueue(c.KqAddUserRewardConf, kqMq.NewAddUserRewardActionMq(ctx, svcContext)),
		// 新增用户登录日志
		kq.MustNewQueue(c.KqAddUserLoginLogConf, kqMq.NewAddUserLoginLogMq(ctx, svcContext)),
	}
}
